<%--
  Created by IntelliJ IDEA.
  User: Stiofan
  Date: 2016/12/23
  Time: 8:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/common/tags.jsp" %>

<aos:html title="房屋所有权登记管理" base="http" lib="ext">
    <aos:body>
    </aos:body>
</aos:html>
<aos:onready>
    <aos:viewport layout="fit">
        <aos:panel layout="column" columnWidth="1" border="false" autoScroll="true">
            <aos:docked dock="top" columnWidth="1" layout="column" border="true" height="140">
                <aos:formpanel id="ryjcxxForm" layout="column" columnWidth="1">
                    <aos:fieldset title="人员基础信息" collapsible="false">
                        <aos:hiddenfield id="djxh" name="djxh"/>
                        <aos:textfield id="nsrsbh" name="nsrsbh" fieldLabel="纳税人识别号" columnWidth="0.25"
                                       onenterkey="queryRyjcxx"/>
                        <aos:hiddenfield id="shxydm" name="shxydm" fieldLabel="社会信用代码" columnWidth="0.25"
                                         onenterkey="queryRyjcxx"/>
                        <aos:hiddenfield id="zzjgdm" name="zzjgdm" fieldLabel="组织机构代码" columnWidth="0.25"
                                         onenterkey="queryRyjcxx"/>
                        <aos:textfield id="nsrmc" name="nsrmc" fieldLabel="纳税人名称" columnWidth="0.25" readOnly="true"/>
                        <aos:textfield id="lxrxm" name="lxrxm" fieldLabel="联系人姓名" columnWidth="0.25" readOnly="true"/>
                        <aos:combobox id="lxrsfzjlxDm" name="lxrsfzjlxDm" fieldLabel="证件类型" dicField="sfzjlxDm"
                                      columnWidth="0.25" dicFilter="201" readOnly="true"/>
                        <aos:textfield id="lxrsfzjhm" name="lxrsfzjhm" fieldLabel="证件号码" columnWidth="0.25"
                                       readOnly="true"/>
                        <aos:textfield id="lxrgddh" name="lxrgddh" fieldLabel="固定电话" columnWidth="0.25"
                                       readOnly="true"/>
                        <aos:textfield id="lxryddh" name="lxryddh" fieldLabel="移动电话" columnWidth="0.25"
                                       readOnly="true"/>
                        <aos:textfield id="lxrdz" name="lxrdz" fieldLabel="联系人地址" columnWidth="1" readOnly="true"/>
                    </aos:fieldset>
                </aos:formpanel>
            </aos:docked>
            <aos:gridpanel id="fcsyqGrid" layout="fit" forceFit="true" url="fcsyqdjglService.queryFcsyqdjxxByDjxh"
                           hidePagebar="true" onitemdblclick="makeSure_fcsyqdjxx_fcbh" width="2000"
                           autoScroll="true" features="summary">
                <aos:column header="房产产权UUID" dataIndex="fcsyquuid" align="center" hidden="true"/>
                <aos:column header="房产编号" dataIndex="fcbh" align="center" width="1"
                            summaryRenderer="function(){return '合计'}"/>
                <aos:column header="房产名称" dataIndex="fcmc" align="center" width="1.5"/>
                <aos:column header="坐落地址" dataIndex="zldz" align="center" width="3"/>
                <aos:column header="建筑面积" dataIndex="jzmj" type="number" format="0.00" defaultValue="0"
                            summaryType="sum" width="1"/>
                <aos:column header="房产总原值" dataIndex="fczyz" type="number" format="0.00" defaultValue="0"
                            summaryType="sum" width="1"/>
                <aos:column header="免税面积" dataIndex="fcsyqMsmj" type="number" format="0.00" defaultValue="0"
                            summaryType="sum" width="1"/>
                <aos:column header="免税原值" dataIndex="fcsyqMsje" type="number" format="0.00" defaultValue="0"
                            summaryType="sum" width="1"/>
                <aos:column header="应税原值" dataIndex="fcsyqYsyz" type="number" format="0.00" defaultValue="0"
                            summaryType="sum" width="1"/>
                <aos:column header="起始日期" dataIndex="fcsyqQsrq" type="date" format="Y-m-d" align="center" width="1"/>
                <aos:column header="终止日期" dataIndex="fcsyqZzrq" type="date" format="Y-m-d" align="center" width="1"/>
            </aos:gridpanel>
            <aos:window id="zfFcsyqdjxxWin" title="作废房产使用权登记信息" width="1000" maxHeight="460">
                <aos:formpanel id="zfFcsyqdjxxForm" layout="column" autoScroll="true">
                    <aos:textareafield id="zfyy" name="zfyy" fieldLabel="作废原因" labelWidth="60" columnWidth="1"
                                       height="200"/>
                    <aos:docked dock="bottom" ui="footer">
                        <aos:dockeditem xtype="tbfill"/>
                        <aos:dockeditem text="作废" onclick="zfFcsyqdjxxByFcsyquuid" icon="del.png"/>
                        <aos:dockeditem text="关闭" onclick="#zfFcsyqdjxxWin.close();" icon="close.png"/>
                    </aos:docked>
                </aos:formpanel>
            </aos:window>
            <aos:docked dock="bottom" ui="footer" columnWidth="1" layout="column" border="false" height="240">
                <aos:formpanel id="fcjcxxForm" layout="column" columnWidth="1">
                    <aos:fieldset title="房产基础信息" collapsible="false">
                        <aos:hiddenfield id="fcjcxxForm_fcsyuuid" name="fcsyuuid"/>
                        <aos:textfield id="fcbh" name="fcbh" fieldLabel="房产编号" columnWidth="0.25" onenterkey="queryFcjcxx"/>
                        <aos:textfield id="fcmc" name="fcmc" fieldLabel="房产名称" columnWidth="0.25" readOnly="true"/>
                        <aos:textfield id="jzmj" name="jzmj" fieldLabel="建筑面积(平米)" columnWidth="0.25" readOnly="true"
                                       regex="/^[0-9]+([.]{1}[0-9]{1,2})?$/" regexText="必输输入数字并且保留至多两位小数"
                                       msgTarget="under"/>
                        <aos:combobox id="fcytDm" name="fcytDm" fieldLabel="房产用途" columnWidth="0.25" dicField="fcytDm"
                                      readOnly="true"/>
                        <aos:combobox id="fcjgDm" name="fcjgDm" fieldLabel="房产结构" columnWidth="0.25" dicField="fcjgDm"
                                      readOnly="true"/>
                        <aos:textfield id="fczyz" name="fczyz" fieldLabel="房产总原值" columnWidth="0.25" readOnly="true"
                                       regex="/^[0-9]+([.]{1}[0-9]{1,2})?$/" regexText="必输输入数字并且保留至多两位小数"
                                       msgTarget="under"/>
                        <aos:datefield id="fcyxqq" name="fcyxqq" fieldLabel="房产有效期起" columnWidth="0.25" readOnly="true"
                                       format="Y-m-d"/>
                        <aos:datefield id="fcyxqz" name="fcyxqz" fieldLabel="房产有效期止" columnWidth="0.25" readOnly="true"
                                       format="Y-m-d"/>
                    </aos:fieldset>
                </aos:formpanel>
                <aos:formpanel id="fcsyqdjxxForm" layout="column" columnWidth="1">
                    <aos:fieldset title="房屋所有权信息" collapsible="false">
                        <aos:hiddenfield id="fcsyquuid" name="fcsyquuid"/>
                        <aos:combobox id="fcsyrlxDm" name="fcsyrlxDm" dicField="fcsyrlxDm" dicFilter="01" fieldLabel="使用人类型"
                                      columnWidth="0.25" value="01" readOnly="true"/>
                        <aos:combobox id="fcsyqlxDm" name="fcsyqlxDm" dicField="fcsyqlxDm" dicFilter="01" fieldLabel="使用权类型"
                                      columnWidth="0.25" value="01" readOnly="true"/>
                        <aos:textfield id="fcsyqZsbh" name="fcsyqZsbh" fieldLabel="房产证号" columnWidth="0.25"
                                       readOnly="true"/>
                        <aos:datefield id="fcsyqQdrq" name="fcsyqQdrq" fieldLabel="实际使用日期" columnWidth="0.25"
                                       readOnly="true"/>
                        <aos:hiddenfield id="fcsyqQsrq" name="fcsyqQsrq" fieldLabel="使用权起始日期" columnWidth="0.25"/>
                        <aos:hiddenfield id="fcsyqZzrq" name="fcsyqZzrq" fieldLabel="使用权终止日期" columnWidth="0.25"/>
                        <aos:hiddenfield id="fcsyqYsmj" name="fcsyqYsmj" fieldLabel="使用权应税面积" columnWidth="0.25"
                                         regex="/^[0-9]+([.]{1}[0-9]{1,2})?$/" regexText="必输输入数字并且保留至多两位小数"
                                         msgTarget="under"/>
                        <aos:hiddenfield id="fcsyqYsje" name="fcsyqYsje" fieldLabel="使用权应税金额" columnWidth="0.25"
                                         regex="/^[0-9]+([.]{1}[0-9]{1,2})?$/" regexText="必输输入数字并且保留至多两位小数"
                                         msgTarget="under"/>
                        <aos:combobox id="fcsyqJmxz" name="fcsyqJmxz" fieldLabel="减免性质" columnWidth="0.25"
                                      dicField="tdjmxzDm"/>
                        <aos:textfield id="fcsyqMsmj" name="fcsyqMsmj" fieldLabel="免税面积" columnWidth="0.25"
                                       regex="/^[0-9]+([.]{1}[0-9]{1,2})?$/" regexText="必输输入数字并且保留至多两位小数"
                                       msgTarget="under" onblur="calcFcsyqMsjeAndFcsyqYsyz" star="true" allowBlank="false"/>
                        <aos:textfield id="fcsyqMsje" name="fcsyqMsje" fieldLabel="免税原值" columnWidth="0.25"
                                       regex="/^[0-9]+([.]{1}[0-9]{1,2})?$/" regexText="必输输入数字并且保留至多两位小数"
                                       msgTarget="under" readOnly="true" star="true" allowBlank="false"/>
                        <aos:textfield id="fcsyqYzje" name="fcsyqYzje" fieldLabel="应税原值" columnWidth="0.25"
                                       regex="/^[0-9]+([.]{1}[0-9]{1,2})?$/" regexText="必输输入数字并且保留至多两位小数"
                                       msgTarget="under" readOnly="true" star="true" allowBlank="false"/>
                    </aos:fieldset>
                </aos:formpanel>
                <aos:panel layout="column" columnWidth="1" border="false">
                    <aos:panel layout="column" columnWidth="0.5" center="true" animate="false" border="false">
                        <aos:button id="btnAdd" text="新增" columnWidth="0.25" margin="2" onclick="addNewFcsyqdjxx"/>
                        <aos:button id="btnSave" text="保存" columnWidth="0.25" margin="2" onclick="saveFcsyqdjxx"/>
                        <aos:button id="btnDel" text="作废" columnWidth="0.25" margin="2"
                                    onclick="#zfFcsyqdjxxWin.show();"/>
                        <aos:button text="重置" columnWidth="0.25" margin="2" onclick="resetAllForms"/>
                    </aos:panel>
                </aos:panel>
            </aos:docked>
        </aos:panel>
    </aos:viewport>
    <script type="text/javascript">
        function queryRyjcxx() {
            if (nsrsbh.getValue() === "") {
                AOS.err("必须输入纳税人识别号进行查询");
            } else {
                var params = {
                    nsrsbh: nsrsbh.getValue(),
                    shxydm: nsrsbh.getValue(),
                    zzjgdm: nsrsbh.getValue(),
                    djxh: djxh.getValue()
                };
                AOS.ajax({
                    params: params,
                    url: "fcsyqdjglService.queryRyjcxx",
                    ok: function (data) {
                        Ext.getCmp("btnAdd").setDisabled(false);
                        Ext.getCmp("btnSave").setDisabled(false);
                        Ext.getCmp("btnDel").setDisabled(false);
                        if (data.appcode === "noRyxx") {
                            Ext.getCmp("btnAdd").setDisabled(true);
                            Ext.getCmp("btnSave").setDisabled(true);
                            Ext.getCmp("btnDel").setDisabled(true);
                            AOS.tip("未查询到相关信息，可以进行人员基础信息采集!");
                        } else {
                            AOS.setValues(ryjcxxForm, data);
                            AOS.read(nsrsbh);
                            AOS.read(shxydm);
                            AOS.read(zzjgdm);
                            var params = {
                                djxh: data.djxh
                            };
                            fcsyqGrid_store.getProxy().extraParams = params;
                            fcsyqGrid_store.reload();
                            if (fcsyqGrid_store.getCount() === 0) {
                                AOS.tip("未查询到已经登记的房产产权信息，请点击新增按钮增加！");
                                AOS.edit(fcbh);
                            } else {
                                AOS.read(fcbh);
                                AOS.tip("根据人员信息查询到共" + fcsyqGrid_store.getCount() + "房产登记信息，可以通过新增、修改、删除按钮进行更改！");
                            }
                        }
                    }
                })
            }
        }
        function queryXzqhszDmBySjxzqhszDm(obj) {
            var sjxzqhsz_dm = "";
            if (obj.name === "lxrdzXzqhdsDm") {
                sjxzqhsz_dm = lxrdzXzqhdsDm.getValue();
            } else if (obj.name === "xzqhdsDm") {
                sjxzqhsz_dm = xzqhdsDm.getValue();
            }
            var params = {
                sjxzqhszDm: sjxzqhsz_dm
            };
            if (obj.name === "lxrdzXzqhdsDm") {
                lxrdzXzqhxqDm_store.getProxy().extraParams = params;
                lxrdzXzqhxqDm_store.reload();
            } else if (obj.name === "xzqhdsDm") {
                xzqhxqDm_store.getProxy().extraParams = params;
                xzqhxqDm_store.reload();
            }
        }
        function queryJdxzDmByXzqhszDm(obj) {
            var xzqhsz_dm = "";
            if (obj.name === "lxrdzXzqhxqDm") {
                xzqhsz_dm = lxrdzXzqhxqDm.getValue();
            } else if (obj.name === "xzqhxqDm") {
                xzqhsz_dm = xzqhxqDm.getValue();
            }
            var params = {
                xzqhszDm: xzqhsz_dm
            };
            if (obj.name === "lxrdzXzqhxqDm") {
                lxrdzJdxzDm_store.getProxy().extraParams = params;
                lxrdzJdxzDm_store.reload();
            } else if (obj.name === "xzqhxqDm") {
                jdxzDm_store.getProxy().extraParams = params;
                jdxzDm_store.reload();
            }
        }
        function queryFcjcxx() {
            if (fcbh.getValue() === "") {
                AOS.err("必须输入房产编号进行查询");
            } else {
                AOS.read(fcbh);
                var params = {
                    fcbh: fcbh.getValue()
                };
                AOS.ajax({
                    params: params,
                    url: "fcjcxxcjService.queryFcjcxx",
                    ok: function (data) {
                        if (data.appcode === "noFcjcxx") {
                            AOS.err("未查询到相关房产基础信息，请检查查询条件或维护房产基础信息!");
                            AOS.edit(fcbh);
                            //queryXzqhszDmBySjxzqhszDm();
                        } else {
                            AOS.tip("查询到相关房产基础信息并权限校验通过！");
                            AOS.setValues(fcjcxxForm, data);
                            Ext.getCmp("fcsyqZsbh").setValue(data.fczh);
                            Ext.getCmp("fcsyqYsmj").setValue(data.jzmj);
                            Ext.getCmp("fcsyqYsje").setValue(data.fczyz);
                            if (data.fcqdrq !== "" && data.fcqdrq !== undefined) {
                                AOS.setValue("fcsyqQdrq", Ext.Date.parse(data.fcqdrq.substr(0, 10), 'Y-m-d', true));
                            }
                            if (data.fcyxqq !== "" && data.fcyxqq !== undefined) {
                                AOS.setValue("fcyxqq", Ext.Date.parse(data.fcyxqq.substr(0, 10), 'Y-m-d', true));
                                AOS.setValue("fcsyqQsrq", Ext.Date.parse(data.fcyxqq.substr(0, 10), 'Y-m-d', true));
                            }
                            if (data.fcyxqz !== "" && data.fcyxqz !== undefined) {
                                AOS.setValue("fcyxqz", Ext.Date.parse(data.fcyxqz.substr(0, 10), 'Y-m-d', true));
                                AOS.setValue("fcsyqZzrq", Ext.Date.parse(data.fcyxqz.substr(0, 10), 'Y-m-d', true));
                            }
                            Ext.getCmp("btnSave").setDisabled(false);
                        }
                    }
                });
            }
        }
        function queryFcsyqdjxx() {
            var params = {
                fcsyquuid: fcsyquuid.getValue()
            };
            AOS.ajax({
                params: params,
                url: "fcsyqdjglService.queryFcsyqdjxxByFcsyquuid",
                ok: function (data) {
                    AOS.setValues(fcsyqdjxxForm, data);
                    if (data.fcsyqQdrq !== "" && data.fcsyqQdrq !== undefined) {
                        AOS.setValue("fcsyqdjxxForm.fcsyqQdrq", Ext.Date.parse(data.fcsyqQdrq.substr(0, 10), 'Y-m-d', true));
                    }
                    if (data.fcsyqQsrq !== "" && data.fcsyqQsrq !== undefined) {
                        AOS.setValue("fcsyqdjxxForm.fcsyqQsrq", Ext.Date.parse(data.fcsyqQsrq.substr(0, 10), 'Y-m-d', true));
                    }
                    if (data.fcsyqZzrq !== "" && data.fcsyqZzrq !== undefined) {
                        AOS.setValue("fcsyqdjxxForm.fcsyqZzrq", Ext.Date.parse(data.fcsyqZzrq.substr(0, 10), 'Y-m-d', true));
                    }
                }
            });
        }
        function saveFcsyqdjxx() {
            if (Number(Ext.getCmp("fcsyqMsmj").getValue()) > Number(Ext.getCmp("jzmj").getValue())) {
                AOS.err("免税面积不能大于建筑面积,请修改!");
                return;
            }
            if (Ext.getCmp("fcsyqYsmj").getValue() === "") {
                AOS.setValue("fcsyqYsmj", 0);
            }
            if (Ext.getCmp("fcsyqMsmj").getValue() === "") {
                AOS.setValue("fcsyqMsmj", 0);
            }
            if (Ext.getCmp("fcsyqYsje").getValue() === "") {
                AOS.setValue("fcsyqYsje", 0);
            }
            if (Ext.getCmp("fcsyqMsje").getValue() === "") {
                AOS.setValue("fcsyqMsje", 0);
            }
            if (Ext.getCmp("fcyxqq").getRawValue() !== "") {
                AOS.setValue("fcsyqQsrq", Ext.getCmp("fcyxqq").getRawValue());
            }
            if (Ext.getCmp("fcyxqz").getRawValue() !== "") {
                AOS.setValue("fcsyqZzrq", Ext.getCmp("fcyxqz").getRawValue());
            }
            calcFcsyqMsjeAndFcsyqYsyz();
            if (AOS.valid(fcsyqdjxxForm)) {

                var params = {
                    djxh: Ext.getCmp("djxh").getValue(),
                    fcbh: Ext.getCmp("fcbh").getValue(),
                    jzmj: Ext.getCmp("jzmj").getValue()
                };
                var fcysymj = 0;//定义房产已使用面积，用于累加已经登记使用权的应税面积及免税面积
                for (var i = 0; i < fcsyqGrid_store.getCount(); i++) {
                    var record = fcsyqGrid_store.getAt(i);
                    if (Ext.getCmp("fcbh").getValue() === record.data.fcbh && Ext.getCmp("fcsyquuid").getValue() !== record.data.fcsyquuid) {
                        fcysymj = fcysymj + parseFloat(record.data.fcsyqYsmj) + parseFloat(record.data.fcsyqMsmj);
                        //当使用人类型与使用权类型已经存在登记过的信息是，将校验是否存在日期交叉情况
                        if (Ext.getCmp("fcsyrlxDm").getValue() === record.data.fcsyrlxDm) {
                            if ((Date.parse(Ext.getCmp("fcsyqQsrq").getValue()) <= Date.parse(record.data.fcsyqQsrq.substr(0, 10)) &&
                                Date.parse(Ext.getCmp("fcsyqZzrq").getValue()) >= Date.parse(record.data.fcsyqQsrq.substr(0, 10))) ||
                                (Date.parse(Ext.getCmp("fcsyqQsrq").getValue()) <= Date.parse(record.data.fcsyqZzrq.substr(0, 10)) &&
                                Date.parse(Ext.getCmp("fcsyqZzrq").getValue()) >= Date.parse(record.data.fcsyqZzrq.substr(0, 10))) ||
                                (Date.parse(Ext.getCmp("fcsyqQsrq").getValue()) <= Date.parse(record.data.fcsyqQsrq.substr(0, 10)) &&
                                Date.parse(Ext.getCmp("fcsyqZzrq").getValue()) >= Date.parse(record.data.fcsyqZzrq.substr(0, 10))) ||
                                (Date.parse(Ext.getCmp("fcsyqQsrq").getValue()) >= Date.parse(record.data.fcsyqQsrq.substr(0, 10)) &&
                                Date.parse(Ext.getCmp("fcsyqZzrq").getValue()) <= Date.parse(record.data.fcsyqZzrq.substr(0, 10)))) {
                                AOS.err("针对同一使用人类型及使用权类型，不允许存在多条登记信息!");
                                return;
                            }
                        }
                    }
                }
                var fcdjzmj = parseFloat(Ext.getCmp("fcsyqYsmj").getValue()) + parseFloat(Ext.getCmp("fcsyqMsmj").getValue()) + parseFloat(fcysymj);
                //校验面积
                if (fcdjzmj > parseFloat(Ext.getCmp("jzmj").getValue())) {
                    AOS.err("本次登记的使用权面积与已登记的使用权面积之和(" + fcdjzmj + ")大于房产建筑面积(" + parseFloat(Ext.getCmp("jzmj").getValue()) + "),请检查所填应税面积、免税面积是否正确!");
                    return;
                }
                AOS.ajax({
                    params: params,
                    forms: fcsyqdjxxForm,
                    url: "fcsyqdjglService.saveFcsyqdjxx",
                    ok: function (data) {
                        if (data.appcode === "suc") {
                            AOS.tip("房产产权信息保存成功！");
                            fcsyqGrid_store.reload();
                            Ext.getCmp("btnSave").setDisabled(true);
                        } else if (data.appcode === "err") {
                            AOS.err(data.appmsg);
                        }

                    }
                });
            } else {
                AOS.err("请检查相关信息是否输入完整！");
            }
        }
        function resetAllForms() {
            AOS.reset(ryjcxxForm);
            AOS.reset(fcjcxxForm);
            AOS.reset(fcsyqdjxxForm);
            AOS.edit(nsrsbh);
            AOS.edit(shxydm);
            AOS.edit(zzjgdm);
            fcsyqGrid_store.removeAll();
            Ext.getCmp("btnAdd").setDisabled(false);
            Ext.getCmp("btnSave").setDisabled(false);
            Ext.getCmp("btnDel").setDisabled(false);
        }
        function makeSure_fcsyqdjxx_fcbh() {
            var record = AOS.selectone(Ext.getCmp("fcsyqGrid"));
            AOS.reset(fcjcxxForm);
            AOS.reset(fcsyqdjxxForm);
            AOS.setValue("fcjcxxForm.fcbh", record.data.fcbh);
            AOS.setValue("fcsyqdjxxForm.fcsyquuid", record.data.fcsyquuid);
            queryFcjcxx();
            queryFcsyqdjxx();
            Ext.getCmp("btnSave").setDisabled(false);
        }
        function addNewFcsyqdjxx() {
            AOS.edit(fcbh);
            AOS.reset(fcjcxxForm);
            AOS.reset(fcsyqdjxxForm);
        }
        function zfFcsyqdjxxByFcsyquuid() {
        	var record = AOS.selectone(Ext.getCmp("fcsyqGrid"));
            var params = {
            		fcsyquuid: record.data.fcsyquuid
            };
           

            AOS.ajax({
                params: params,
                forms: zfFcsyqdjxxForm,
                url: "fcsyqdjglService.zfFcsyqdjxxByFcsyquuid",
                ok: function (data) {
                    if (data.appcode = "suc") {
                        AOS.tip("房产使用权信息作废成功!");
                        fcsyqGrid_store.reload();
                    } else {
                        AOS.err(data.appmsg);
                    }
                    zfFcsyqdjxxWin.close();
                }
            });
        }
        function calcFcsyqMsjeAndFcsyqYsyz() {
            var msje = Ext.getCmp("fczyz").getValue() / Ext.getCmp("jzmj").getValue() * Ext.getCmp("fcsyqMsmj").getValue();
            Ext.getCmp("fcsyqMsje").setValue(Number(msje).toFixed(2));
            Ext.getCmp("fcsyqYzje").setValue(Number(Ext.getCmp("fczyz").getValue() - Ext.getCmp("fcsyqMsje").getValue()).toFixed(2));
            Ext.getCmp("fcsyqYsmj").setValue(Ext.getCmp("jzmj").getValue() - Ext.getCmp("fcsyqMsmj").getValue());
        }

    </script>
    Ext.getCmp("btnAdd").setDisabled(true);
    Ext.getCmp("btnSave").setDisabled(true);
    Ext.getCmp("btnDel").setDisabled(true);
</aos:onready>
